import http from "@/utils/request";

export default{
    /**
     * 查询列表
     * @param  params
     * @returns
     */
    // async getSyjList(pageNo,pageSize,approveStatus,startDate,endDate){
    //     console.log(29999999);
    //     return await http.get("/api/syjtjb/list",{pageNo,pageSize,approveStatus,startDate,endDate});
    // },
    async getSyjList(params){
        console.log(29999999);
        return await http.get("/api/syjtjb/listToZnyjtz",params);
    },
    // async getSyjList(params){
    //     console.log(29999999);
    //     return await http.get("/api/syjtjb/list",params);
    // },
    /**
    * 添加
    * @returns
    */
    async addSyj(params){
        // console.log(1);
        return await http.post("/api/syjtjb/add",params)
    },
    /**
    * 修改
    * @returns
    */
    async updateSyj(params){
        // console.log(29999999);
        return await http.put("/api/syjtjb/update",params)
    },
    //上传文件
    async importExcel(myfile){
        // console.log(29999999);
        console.log(myfile.get("myfile"));

        return await http.upload("/api/fileAbout/fileUpload",{myfile})
    },

    //导入文件
    async batchImportExcel(filePath){
        // console.log(typeof(filePath));
        // console.log(filePath.get("filePath"));
        return await http.upload("/api/syjtjb/batchInput",{filePath})
    },

    /**
    * 下载模板
    */
    async download(params){
        // console.log(1);
        return await http.get("/api/syjtjb/downLoadExcel",params)
    },

    //删除
    async delete(params) {
        return await http.delete('api/syjtjb/delete', params);

    },
    //批量删除
    async Bdelete(params) {
        return await http.post('/api/syjtjb/batchDelete', params);

    }
}
